$(function(){
	var winw = window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;
	var ban_left = (winw-2300)/2;
	$('#ban').css({left:ban_left});

	$(window).resize(function(){
		winw = window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;
		ban_left = (winw-2300)/2;
		$('#ban').css({left:ban_left});
	})
	$('#ban_l').mouseover(function(){
		$('#ban').stop(true,false).animate({left:0},600,'easeInOutQuad');	
	})
	$('#ban_r').mouseover(function(){
		$('#ban').stop(true,false).animate({left:ban_left*2},600,'easeInOutQuad');	
	})
	$('#ban').mouseleave(function(){
		$('#ban').stop(true,false).animate({left:ban_left},600,'easeInOutQuad');	
	})
	$('#ban_l').banner();
	$('#ban_r').banner();
	$(window).scroll( function() {
		var fromtheTop = $(this).scrollTop();
		var newTop = 330-fromtheTop;
		$('.ban_nav').css({top:newTop});
	});
})